_base_ = '../dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py'

load_from = 'https://download.openmmlab.com/mmdetection/v2.0/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x/dynamic_rcnn_r50_fpn_1x-62a3f276.pth'

model = dict(roi_head=dict(bbox_head=dict(num_classes=9)))
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=30, val_interval=1)

dataset_type = 'CocoDataset'
data_root = 'data/sewer/'
metainfo = {
    'classes': ('aj','cj','ck','cq','pl','sg','sl','tl','zw', ),
    'palette': [
        (220, 20, 60),
        (0, 255, 0),
        (0, 0, 255),
        (255, 255, 0),
        (255, 0, 255),
        (0, 255, 255),
        (128, 0, 128),
        (255, 165, 0),
        (128, 128, 0)
    ]
}

train_dataloader = dict(
    batch_size=8,
    dataset=dict(
        data_root=data_root,
        ann_file='annotations/trainval.json',
        data_prefix=dict(img='images/'),
        metainfo=metainfo))
val_dataloader = dict(
    batch_size=8,
    dataset=dict(
        data_root=data_root,
        ann_file='annotations/test.json',
        data_prefix=dict(img='images/'),
        metainfo=metainfo))
test_dataloader = val_dataloader

val_evaluator = dict(
    ann_file=data_root + 'annotations/test.json')
test_evaluator = val_evaluator

_base_.visualizer.vis_backends = [dict(type='LocalVisBackend'), dict(type='WandbVisBackend')]
